# -*- encoding: utf-8 -*-

# -- this is magic line that ensures "../lib" is in the load path -------------
$:.push File.expand_path("../lib", __FILE__)

require 'fileutils'

# Copy in the config sample files to /config folder
FileUtils.cp("config/deploy.yml.sample", "../../config/")
FileUtils.cp("config/cbt-promotion-deploy-cluster.yml.sample", "../../")
FileUtils.cp("config/cbt-promotion-deploy-single.yml.aloneMongs.sample", "../../")
FileUtils.cp("config/cbt-promotion-deploy-single.yml.embeddedMongs.sample", "../../")
FileUtils.cp("config/cbt-promotion-hostname.yml", "../../config/")
FileUtils.cp("config/cbt-promotion-portmapping.yml", "../../config/")
FileUtils.cp("config/cbt-artifact-location.yml", "../../config/")
FileUtils.cp("config/updateEnvConf-cbt.yml.sample", "../../config/")


Gem::Specification.new do |s|
  s.name        = "depac-deployment"
  s.version     = "0.0.1"
  s.authors     = ["Yi BJ Kong"]
  s.email       = ["kongyibj@cn.ibm.com"]
  s.homepage    = "http://www.ibm.com"
  s.summary     = %q{Deployment Accelerator Deployment gem}
  s.description = %q{This gem provides scripts for Deployment Accelerator cloud provisioning services}

  s.files       = ["lib/depac-deployment.rb", 
					  "lib/depac-deployment/environment_configuration.rb", 
					  "lib/depac-deployment/add_instance.rb", 
					  "lib/depac-deployment/helper.rb",
					  "lib/depac-deployment/helper_cbt.rb",
					  "lib/depac-deployment/option_parser_class.rb",
					  "lib/depac-deployment/configure.rb",
					  "lib/depac-deployment/provision.rb",
					  "lib/depac-deployment/deployPromotion_cbt.rb",
					  "lib/depac-deployment/add_instance.rb",
					  "lib/depac-deployment/version.rb",
					  "lib/depac-deployment/update_env.rb",
					  "lib/depac-deployment/update_env_cbt.rb",
					  "lib/depac-deployment/update_database.rb",
					  "lib/depac-deployment/update_ihsplugin.rb",
					  "lib/depac-deployment/newrelic_configuration.rb",
					  "lib/depac-deployment/remove_instance.rb",
					  "bin/createEnvironment",
					  "bin/deleteEnvironment",
					  "bin/createPromotionEnvironment",
					  "bin/updatePromotionEnvironment",
					  "config/usage.yml",
					  "config/validate.yml",
					  "config/image_names.yml",
					  "config/cbt-promotion-deploy-cluster.yml.sample",
					  "config/cbt-artifact-location.yml",
					  "config/cbt-promotion-deploy-single.yml.aloneMongs.sample",
					  "config/cbt-promotion-deploy-single.yml.embeddedMongs.sample",
					  "config/updateEnvConf-cbt.yml.sample",
					  "config/cbt-promotion-hostname.yml",
					  "config/cbt-promotion-portmapping.yml",
					  "config/deploy.yml.sample"]

  s.executables   = ["createEnvironment", "createPromotionEnvironment", "deleteEnvironment", "deleteCBTEnvironment", "addInstance", "getVlanDetails", "updateDB", "updateEnvironment", "updatePromotionEnvironment", "updateCBTEnvironment", "removeInstance", "addCBTComponent"]

  s.require_paths = ["lib"]
  
  s.add_runtime_dependency "softlayer_api", ["= 1.0.7"]
  s.add_runtime_dependency "erubis", ["= 2.7.0"]
end